//+-----------------------------------------------------------------------------
//| Inclusion guard
//+-----------------------------------------------------------------------------
#ifndef MAGOS_TIMER_H
#define MAGOS_TIMER_H


//+-----------------------------------------------------------------------------
//| Included files
//+-----------------------------------------------------------------------------
#include "Common.h"


//+-----------------------------------------------------------------------------
//| Constants
//+-----------------------------------------------------------------------------
CONST UINT DEFAULT_TIMED_ID = 1337;


//+-----------------------------------------------------------------------------
//| Timer class
//+-----------------------------------------------------------------------------
class TIMER
{
	public:
		CONSTRUCTOR TIMER();
		DESTRUCTOR ~TIMER();

		VOID Start(DWORD Timeout);
		BOOL Check() CONST;
		VOID Sleep() CONST;

	protected:
		BOOL HighResolutionSet;
		DWORD NextTimerValue;
};


//+-----------------------------------------------------------------------------
//| Global objects
//+-----------------------------------------------------------------------------
extern TIMER Timer;

//+-----------------------------------------------------------------------------
//| End of inclusion guard
//+-----------------------------------------------------------------------------
#endif
